<?php 
   include "counter.php";
# To test for whether cookies are enabled
   setcookie("cookiesenabled", "true");
   pagestart ();
# Fetch parameters
  $url = $counter->get_input("url", "", "get");
 ?>
<html>
<?php pagehead("Login") ?>
<body>
<?php pagetop("Log In") ?>
<form method="post" action="/cgi-bin/runscript/login.cgi">
<table>
<tr><td>Reg. number or email<td><input name="user">
<tr><td>Password<td><input type="password" name="password">
<tr><td><td><input type="submit" name="enter" value="Enter">
</table>
<input type="hidden" name="url"
<?php 
 $http_host = getenv("HTTP_HOST");
 if ($url != "") {
    echo "value=\"$url\"";
 } else if (preg_match("!^http://$http_host!", getenv("HTTP_REFERER"))) {
      echo "value=\"", getenv("HTTP_REFERER"), "\"";
 } else {
      echo "value=\"/person/\"";
}
?>
>

</form>
<p>The password (also called user key) is something like 12345-67890,
and should have been in the message you got from the Linux Counter
when you registered. </p>
<strong>Note:</strong> You must have <em>cookies</em> enabled in
order to log in. An experimental workaround is in place to allow you to
edit your home page without cookies - but this is not finished, and
does not work for everything. Please report problems to <?php print emailCloaking("help@counter.li.org", 0) ?>
<hr>

<p>
If you do not have your key, try to enter the E-mail address you used for
registering below, and see if you get it E-mailed to you. </p>

<form method="get" action="/cgi-bin/runscript/emailquery.cgi">
  Email: <input name="email" size="30" maxlength="160"> <br>
  <input TYPE="submit" VALUE="Email me!"> <input TYPE="reset" VALUE="Clear">
</form>
If you don't have access to the email you registered any more, try the <a href="<?php print $counter_site ?>/lost-key.php">Lost Key Request</a> page.

<p>Someone should respond shortly. </p>

<?php pagebottom() ?>
</body>
</html>
